package com.alibaba.otter.node.etl.load.loader.mq.producer;

import java.util.Properties;

/**
 * MQ 配置
 */
public class MQProperties {

    private String servers;
    private String type = "kafka";
    private int retries = 3;
    private int batchSize = 16384;
    private int lingerMs = 1;
    private int maxRequestSize = 1048576;
    private long bufferMemory = 33554432L;
    private boolean filterTransactionEntry = true;
    private String producerGroup = "MQ-Producer";
    private int canalBatchSize = 50;
    private Long canalGetTimeout = 100L;
    private boolean flatMessage = true;
    private String compressionType = "none";
    private String acks = "all";
    private String aliYunAccessKey = "";
    private String aliYunSecretKey = "";
    private Properties properties = new Properties();
    private boolean enableMessageTrace = false;
    private String accessChannel = null;
    private String customizedTraceTopic = null;
    private String namespace = "";
    private boolean kerberosEnable = false;           // kafka集群是否启动Kerberos认证
    private String kerberosKrb5FilePath = "";              // 启动Kerberos认证时配置为krb5.conf文件的路径
    private String kerberosJaasFilePath = "";              // 启动Kerberos认证时配置为jaas.conf文件的路径


    private String defaultTopic;
    private Integer partition;
    private Integer partitionsNum;
    private String partitionHash;


    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getServers() {
        return servers;
    }

    public void setServers(String servers) {
        this.servers = servers;
    }

    public int getRetries() {
        return retries;
    }

    public void setRetries(int retries) {
        this.retries = retries;
    }

    public int getBatchSize() {
        return batchSize;
    }

    public void setBatchSize(int batchSize) {
        this.batchSize = batchSize;
    }

    public int getLingerMs() {
        return lingerMs;
    }

    public void setLingerMs(int lingerMs) {
        this.lingerMs = lingerMs;
    }

    public long getBufferMemory() {
        return bufferMemory;
    }

    public void setBufferMemory(long bufferMemory) {
        this.bufferMemory = bufferMemory;
    }

    public int getCanalBatchSize() {
        return canalBatchSize;
    }

    public void setCanalBatchSize(int canalBatchSize) {
        this.canalBatchSize = canalBatchSize;
    }

    public Long getCanalGetTimeout() {
        return canalGetTimeout;
    }

    public void setCanalGetTimeout(Long canalGetTimeout) {
        this.canalGetTimeout = canalGetTimeout;
    }

    public boolean getFlatMessage() {
        return flatMessage;
    }

    public void setFlatMessage(boolean flatMessage) {
        this.flatMessage = flatMessage;
    }

    public boolean isFilterTransactionEntry() {
        return filterTransactionEntry;
    }

    public void setFilterTransactionEntry(boolean filterTransactionEntry) {
        this.filterTransactionEntry = filterTransactionEntry;
    }

    public String getProducerGroup() {
        return producerGroup;
    }

    public void setProducerGroup(String producerGroup) {
        this.producerGroup = producerGroup;
    }

    public String getCompressionType() {
        return compressionType;
    }

    public void setCompressionType(String compressionType) {
        this.compressionType = compressionType;
    }

    public String getAcks() {
        return acks;
    }

    public void setAcks(String acks) {
        this.acks = acks;
    }

    public String getAliYunAccessKey() {
        return aliYunAccessKey;
    }

    public void setAliYunAccessKey(String aliYunAccessKey) {
        this.aliYunAccessKey = aliYunAccessKey;
    }

    public String getAliYunSecretKey() {
        return aliYunSecretKey;
    }

    public void setAliYunSecretKey(String aliYunSecretKey) {
        this.aliYunSecretKey = aliYunSecretKey;
    }

    public int getMaxRequestSize() {
        return maxRequestSize;
    }

    public void setMaxRequestSize(int maxRequestSize) {
        this.maxRequestSize = maxRequestSize;
    }

    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public boolean isEnableMessageTrace() {
        return enableMessageTrace;
    }

    public void setEnableMessageTrace(boolean enableMessageTrace) {
        this.enableMessageTrace = enableMessageTrace;
    }

    public String getAccessChannel() {
        return accessChannel;
    }

    public void setAccessChannel(String accessChannel) {
        this.accessChannel = accessChannel;
    }

    public String getCustomizedTraceTopic() {
        return customizedTraceTopic;
    }

    public void setCustomizedTraceTopic(String customizedTraceTopic) {
        this.customizedTraceTopic = customizedTraceTopic;
    }

    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    public boolean isKerberosEnable() {
        return kerberosEnable;
    }

    public void setKerberosEnable(boolean kerberosEnable) {
        this.kerberosEnable = kerberosEnable;
    }

    public String getKerberosKrb5FilePath() {
        return kerberosKrb5FilePath;
    }

    public void setKerberosKrb5FilePath(String kerberosKrb5FilePath) {
        this.kerberosKrb5FilePath = kerberosKrb5FilePath;
    }

    public String getKerberosJaasFilePath() {
        return kerberosJaasFilePath;
    }

    public void setKerberosJaasFilePath(String kerberosJaasFilePath) {
        this.kerberosJaasFilePath = kerberosJaasFilePath;
    }

    public Integer getPartition() {
        return partition;
    }

    public void setPartition(Integer partition) {
        this.partition = partition;
    }

    public Integer getPartitionsNum() {
        return partitionsNum;
    }

    public void setPartitionsNum(Integer partitionsNum) {
        this.partitionsNum = partitionsNum;
    }

    public String getPartitionHash() {
        return partitionHash;
    }

    public void setPartitionHash(String partitionHash) {
        this.partitionHash = partitionHash;
    }


    public String getDefaultTopic() {
        return defaultTopic;
    }

    public void setDefaultTopic(String defaultTopic) {
        this.defaultTopic = defaultTopic;
    }

}
